import instance from "./request"
// 可以看GitHub文档的相关解释,data为参数
// 登录请求
export const loginApi = (data) => instance.post("/admin/auth/login", data)

// 用token获取用户信息  /admin/auth/getUserByToken
export const getUserByTokenApi = () => instance.post("/admin/auth/getUserByToken")

// 查询商品接口
export const GoodDataApi = (params) => instance.get("/admin/goods", { params })

//  上传图片
export const uploadPicApi = (data) => instance.post("/admin/upload/goodNewPic", data)

// 获取运营数据
export const getStatDataApi = () => instance.get("/admin/stat")

// 获取分类数据
export const getCategoryDataApi = () => instance.get("/admin/category ")